import request from '@/utils/request'

export function getSpuListByCatalog3Id(id) {
  return request({
    url: '/spu/list/' + id,
    method: 'get'
  })
}

export function getSpu(id) {
  return request({
    url: '/spu/getById/' + id,
    method: 'get'
  })
}

export function getSpuByParam(query) {
  return request({
    url: '/spu/getSpuByParam',
    method: 'get',
    params: query
  })
}

export function saveSpu(data) {
  return request({
    url: '/spu/save',
    method: 'post',
    data
  })
}

export function deleteSpu(id) {
  return request({
    url: '/spu/deleteById/'+id,
    method: 'post'
  })
}

